import React, { Component } from "react"

const ref = React.createRef()
export default class Item extends Component {
  render() {
    return (
      <div>
        姓名：
        <input type="text" ref={ref} />
        <button
          onClick={() => {
            console.log(ref)
            console.log(ref.current)
          }}
        >按钮</button>
      </div>
    )
  }
}
